/**
 * 
 */
package cn.haona.game.simb.object.process;

import java.sql.Timestamp;
import java.util.HashMap;

import cn.haona.db.RelevanceBean;
import cn.haona.game.simb.object.Persistence;
import cn.haona.game.simb.object.PersistenceImpl;
import cn.haona.game.simb.object.bio.User;
import cn.haona.game.simb.object.geo.AreaInWashshop;
import cn.haona.game.simb.object.item.building.Washshop;
import cn.haona.game.simb.object.logic.StateMachine;
import cn.haona.game.simb.object.logic.washcar.WashCarStateParent;

/**
 * 洗车流程账单
 * 
 * @author Administrator
 * 
 */
public class ProcessWashCarBill extends ProcessImpl {

	/**
	 * 
	 */
	public ProcessWashCarBill() {
		// TODO Auto-generated constructor stub

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.haona.game.simb.Process#getStateMachine()
	 */
	public WashCarStateParent getStateMachine() {
		//如果已经保存了状态机
		if (super.getStateMachine() != null) {
			return (WashCarStateParent) super.getStateMachine();
		}
		//如果还没有状态机
		else {
			//TODO 从PO里面取出className然后构造一个状态机
		}
		return null;
	}

	public void initPO() {
		if (pO == null) {
			pO = new ProcessWashCarBillPO();
		}
	}

	/**
	 * 持久化洗车流程对象
	 * 
	 * @author Administrator
	 * 
	 */
	public class ProcessWashCarBillPO extends PersistenceImpl {

		// 当前状态类名
		private String stateClassName;
		
		//当期流程对应在车行区域
		private AreaInWashshop areaInWashshop;

		//车行
		private Washshop washshop;
		
		//玩家
		private User user;
		
		//得到主键名
		public String getPrimaryKeyName()
		{
			return "";
		}		
		
		public boolean persisMe() {
			// TODO Auto-generated method stub
			return false;
		}
		
		public boolean cacheMe() {
			// TODO Auto-generated method stub
			return false;
		}

		public Persistence updateMe() {
			// TODO Auto-generated method stub
			return null;
		}

		public Long persisMeFirstTime() {
			// TODO Auto-generated method stub
			return -1L;
		}

		public long getID() {
			// TODO Auto-generated method stub
			return id;
		}

		public void setID(long id) {
			this.id = id;

		}

		public String getStateClassName() {
			return stateClassName;
		}

		public void setStateClassName(String stateClassName) {
			this.stateClassName = stateClassName;
		}

		public AreaInWashshop getAreaInWashshop() {
			return areaInWashshop;
		}

		public void setAreaInWashshop(AreaInWashshop areaInWashshop) {
			this.areaInWashshop = areaInWashshop;
		}

		public Washshop getWashshop() {
			return washshop;
		}

		public void setWashshop(Washshop washshop) {
			this.washshop = washshop;
		}

		public User getUser() {
			return user;
		}

		public void setUser(User user) {
			this.user = user;
		}


		public HashMap<String, RelevanceBean> getReflectRelevance() {
			// TODO Auto-generated method stub
			return null;
		}

		
	}

}
